/*
 * @Author: error: git config user.name & please set dead value or install git
 * @Date: 2024-06-27 15:08:55
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-06-27 16:10:01
 * @FilePath: /资源库/vite.config.ts
 */
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react-swc";
import path from "path";
// https://vitejs.dev/config/

export default defineConfig(({ mode }) => {
    const env = loadEnv(mode, __dirname);
    return {
        plugins: [react()],
        base: env.VITE_MODE == "production" ? "./" : "/",
        resolve: {
            alias: {
                "@": path.resolve(__dirname, "src"),
            },
        },
    };
});
